// GPU Verlet Integrator
// Autor: Juan G. Campa

__device__ float3 operator+(const float3 &a, const float3 &b) {
   return make_float3(a.x+b.x, a.y+b.y, a.z+b.z);
}

__device__ float3 operator-(const float3 &a, const float3 &b) {
   return make_float3(a.x-b.x, a.y-b.y, a.z-b.z);
}

extern "C" __global__ void DummyFloat(float *input)
{
   //unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
   float a = input[0];
   float b = input[100];
   float c = input[200];
   float d = a+b+c;
   input[1] = d;

}

extern "C" __global__ void DummyFloat3(float3 *input)
{
   //unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;

   float3 a = input[0];
   float3 b = input[1];
   float3 c = input[2];
   float d = a.x+a.y+a.z;
   input[1] = make_float3(a.x, c.y + b.z, d);
   input[2] = make_float3(a.x, c.x + b.z, d);
   input[3] = make_float3(a.x, c.z + b.z, d);
   input[4] = make_float3(a.y, c.y + b.x, d);
   input[5] = make_float3(a.x, c.y + b.y, d);
}